package net.htjs.canaldemo.handler;

import net.htjs.canaldemo.entity.User;
import org.springframework.stereotype.Component;
import top.javatool.canal.client.annotation.CanalTable;
import top.javatool.canal.client.handler.EntryHandler;

@Component
@CanalTable(value = "user")
public class UserHandler implements EntryHandler<User> {

    @Override
    public void insert(User user) {
        System.out.println("insert:" + user);
    }

    @Override
    public void update(User before, User after) {
        System.out.println("update:" + before + ":" + after);
    }

    @Override
    public void delete(User user) {
        System.out.println("delete:" + user);
    }
}
